MORE NBT DOCUMENTATION
Version: 1.3.0

Index

onUse
add_mob_effect
remove_mob_effect
die
transform_item
replaceitem
merge_data
show_text
decrement_stack
play_sound
score
damage
reload
random
summon
structure
Back to top

Item onUse Tags

OnUse will run the contents when the player clicks while holding the item. You can find all these parameters below. Right now it only works on minecraft:carrot_on_a_stick item. In the future you will be able to use any/all items.


Parameters

Name Type Default Value Description
add_mob_effect Object Array Will give the target the selected effect(s).
Name Type Default Value Description
target String The target context to execute against.
effect String The minecraft effect.
showIcon Boolean TRUE Show particles/icon.
remove_mob_effect Object Array Will remove the target the selected effect(s).
Name Type Description
target String The target context to execute against.
effect String The minecraft effect.
die Object Will kill the target.
Name Type Description
target String The target context to execute against.
transform_item Object replace the curent holding item with the new determined item.
Name Type Description
transform String The item that will be replaced with.
replaceitem Object This will copy and move the item to the new selected Slot.
Name Type Default Value Description
slot String This is the slot the item will end up in.
replace Boolean TRUE If false it will check to see if their already is an item in that slot.
merge_data Object Will apply the data.
Name Type Description
CustomModelData Object Replaces CustomModelData tag with value.
Name Type Description
value Integer Value it will replace.
Damage Object Replaces Damage tag with value.
Name Type Description
value Integer Value it will replace.
HideFlags Object Replaces HideFlags tag with value.
Name Type Description
value Integer Value it will replace.
Unbreakable Object Replaces Unbreakable tag with value.
Name Type Description
value Integer Value it will replace.
show_text Object text releated objects.
Name Type Description
clear Object clears title, subtitle, and actionbar.
Name Type Description
target String The target context to execute against.
say Object clears title, subtitle, and actionbar.
Name Type Description
text String The message to display.
tellraw Object clears title, subtitle, and actionbar.
Name Type Description
target String The target context to execute against.
raw_text String The JSON Formatted text to show.
title Object clears title, subtitle, and actionbar.
Name Type Description
target String The target context to execute against.
raw_text String The JSON Formatted text to show.
subtitle Object clears title, subtitle, and actionbar.
Name Type Description
target String The target context to execute against.
raw_text String The JSON Formatted text to show.
actionbar Object clears title, subtitle, and actionbar.
Name Type Description
target String The target context to execute against.
raw_text String The JSON Formatted text to show.
decrement_stack Object Will remove the selected item/weapon.main hand.
Name Type Description
gamemode Array A list of gamemodes that will remove the item. Put "all" for all gamemodes.
play_sound Object Will play the sound when the item is used.
Name Type Description
target String The target context to execute against.
sound String The sound to play. Only some are currently supported
score Object add, remove, set scores on a scoreboard.
Name Type Description
add Object adds score.
Name Type Description
name String The target context to execute against.
objective String Objective. Must be "score.test#" 0-9.
amount Integer How much to add to score.
set Object sets score.
Name Type Description
name String The target context to execute against.
objective String Objective. Must be "score.test#" 0-9.
amount Integer What to set the score to
remove Object removes score.
Name Type Description
name String The target context to execute against.
objective String Objective. Must be "score.test#" 0-9.
amount Integer How much to remove from the score.
damage Object Will damage the target.
Name Type Description
target String The target context to execute against.
type String The way to apply the damage: "EFFECT", "ARROW".
amount Integer How many half hearts to apply to target.
reload Object Will reload the server. If it is a modded server (Spigot, Bukkit, Paper) it will run /reload confirm.
Name Type Default Value Description
confirm Boolean FALSE Must be set to true for it to reload server.
random Object Will output a random number from the min and max numbers.
Name Type Description
min Integer The minium number to use. Must be less than max.
max Integer The maxium number to use. Must be more than min.
result Integer This is the output. (SelectedItem.tag.onUse.random.result)
summon Object Summon an entity with optional nbt data.
Name Type Description
placement String How to place the entity. This may change. Valid strings: "ON_PLAYER","ON_BLOCK"
entity String The entity to summon.
nbt Array (Optional) nbt that the entity has.
structure Object Set a block with optional data.
Name Type Default Description
structure_name String more_nbt:test The structure to place.
pos Integer Array [0,1,0] The position/ offset of the structure.
ignoreEntities Boolean FALSE (optional) place entities that are stored in the structure file.
powered Boolean TRUE (optional) This will make the structure automatcily load when the item is used.
loot (W.I.P) Object Get the loot from a loot table.
Name Type Description
target String How to get the resulting items. Valid strings: "spawn","give"
source String Where to get the loot from. Valid strings: "loot","kill"
table String The loot table to use. When source=loot.
entity Object The loot table to use. When source=kill.
Name Type Description
sort String Where to look for the entity. Valid strings: "nearest".
type String Entity to look for. Excepts all entities.
set_block (W.I.P) Object Set a block with optional data.
Name Type Description
block_type String The block to place
pos Integer Array Offset on where to place the block
nbt Object Array Nbt data to apply to the block.
blockstate String Array block state to apply to the block.
run_command (W.I.P) Object (not working) will run the command or commands.
Name Type Description
command String The command to run.
command Array String Array A list of commands to run.
Back to top